Next | Prev | Up | Top | Contents | Index

Using pixie

Use pixie to measure the frequency of code execution. pixie reads an executable program, partitions it into basic blocks, and writes (instruments) an equivalent program containing additional code that counts the execution of each basic block.

Note that the execution time of an instrumented program is two-to-five times longer than an uninstrumented one. This timing change may alter the behavior of a program that deals with a graphical user interface (GUI), or depends on events such as SIGALARM that are based on an external clock.


pixie Syntax

The syntax for pixie is:

pixie prog_name [options]

prog_name

Name of the input program.

options

One of the keywords listed in Table 4-3.

pixie Options

Table 4-3 lists pixie options. For a complete list of options refer to the pixie(1) reference page. Click the word pixie to view the page.

Options for pixie
NameResult
-pixie_file out_fileSpecifies a name for the instrumented output file. The default is to remove any leading directory names from the input filename and append .pixie.
-counts_file fileSpecifies a name for the counts file that is generated while running the instrumented program. The default is to remove any leading directory names from the input filename and append .Counts.
-[no]autopixiePermits (or prevents) a recursive instrumenting all dynamic shared libraries used by the input file during run time. pixie keeps the timestamp and checksum from the original executable. Thus, before instrumenting a shared library, pixie checks any lib.pixie files that it finds matching the lib it is to instrument. If the fields match, they are not instrumented. pixie cannot detect shared libraries opened with dlopen (and hence does not instrument them). All used DSOs need to be instrumented for the a.out to work. The default behavior with shared libraries is -noautopixie, and can be overridden with -autopixie, which is the default in all other cases.
-[no]liblistPrevents (or permits) printing the names and paths of dynamic shared libraries used by the input program during run time. This uses the same default search path as rld and prof. This list is useful to build a dependency list for makefiles and shell scripts. pixie cannot detect libraries opened with dlopen. The default is -noliblist.
-[no]pidsAppends the process ID number on the end of the .Counts file. This is useful if you want to run the program instrumented with pixie through a variety of tests. This option is only needed for the main program. It will be transferred automatically to the instrumented DSOs during run time. The default is -nopids.
-[no]verboseSuppresses (or prints) messages summarizing the binary-to-binary translation process. The default is -noverbose.


Next | Prev | Up | Top | Contents | Index